import { useCookies } from '@vueuse/integrations/useCookies';
const cookie = useCookies(['xy_cookie'],{ doNotParse: false, autoUpdateDependencies:false});

// 设置setCookies；
export const setCookies = (key, val, cookieExpires,path) => {
    cookie.set(key,val,{ path: path||'/',maxAge:cookieExpires||60});
};

// 获取getCookies；
export const getCookies = (key) => {
    return cookie.get(key);
};

// 删除cookies
export const removeCookies = (key) => {
    return cookie.remove(key);
};